<?php
$arr		=	$db->database("cf_name,cf_value","config","cf_id = '$ipid'");
$cf_name	=	$arr[0][0];
$cf_value	=	$arr[0][1];
if($_POST['submit']) {
	$cf_value	=	stripslashes(trim(urldecode($_POST['cf_value'])));
	if($cf_value) {
		$db->dbupdate("config","cf_value = '$cf_value'","cf_id = '$ipid'");	
	}
}
?>
<h1><?=$cf_name;?></h1>
	<div class="content_block">
		<div class="form_tbl" id="slides">
			
		
				<span class="border_d clearfix">
					<form name="themeform" enctype="multipart/form-data" method="post">
						<div class="form_item">
                        <?php
						if($ipid == 2) {
						?>
					  <script type="text/javascript" src="./js/bbcode/bbcode.js"></script>
                      <script type="text/javascript">
					  $(document).ready(function(){
						$("#cf_value").bbcode({tag_bold:true,tag_italic:true,tag_underline:true,tag_link:true,tag_image:true,button_image:true});
						process();
					  });
                      </script>
                        <? } ?>
							<textarea id="cf_value" name="cf_value" style="font-family: tahoma; font-size: 10pt;width: 825px; height:300px;"><?=$cf_value;?></textarea>
						</div>
						<div class="form_item">
							<span onmouseout="this.className='mb_btn1'" onmouseover="this.className='mb_btn1_hover'" class="mb_btn1">
								<button value="Submit" name="submit" type="submit">Gửi đi</button>
							</span>
						</div>
					</form>
					
				</span>

			</div>
		</div>